The present invention relates to a method for determining the execution timing of backup of a database in a database management system.
A database management system (hereinafter referred to as the “DBMS”) has been utilized in a wide range of fields such as a customer management system and a commodity management system. With such DBMS which boasts excellent reliability and availability, the maintenance of data or the maintenance of operations in preparation for possible failures plays an important role. One good example of the maintenance of operations is the backup of a database.
Methods for getting the database backup include an off-line backup which is performed by shutting down the DBMS and an on-line backup which is carried out while operating the DBMS.
As the off-line backup is being carried out, in general, a plan to shut down the DBMS during an appropriate time frame, or a backup plan is prepared by a database administrator in advance. For example, for a business-oriented DBMS being used in an enterprise, the DBMS can only be shut down after the work hours. Accordingly, a presumable backup plan is to execute backup by shutting down the DBMS according to the plan after work hours on weekdays and on holidays as well. Since it is necessary to complete the backup procedures within a short period of time if they are to be carried out after work hours on weekdays, a differential backup is executed to acquire the backup only for the portion that has been updated since the previous backup. While on holidays, a full backup is executed to get the backup of the whole database since plenty of time is available in this case.
On the other hand, when the DBMS cannot be subjected to a planned shutdown due to the style of work or the usage of the DBMS, an on-line backup is utilized to achieve backup while operating the DBMS. However, the on-line backup may affect the work process which should constitute the main processing of the DBMS (hereinafter referred to as the “main processing”) while executing the backup, thus causing a possible delay in the processing. Accordingly, in order to perform backup without inducing any delay in the main processing even during the on-line backup, it is necessary to prepare a backup plan which executes backup during a time frame in which an amount of main processing of a database is smaller.
With the Japanese Patent Laid-open No. 2000-347919 wherein on-line backup is executed during a time frame in which the amount of main processing is smaller, the busy rate is used as an index to represent the amount of main processing. Here, the busy rate implies a rate of disk accessing time for read or write per unit time.
A processing flow of the above-stated prior art will be described by referring to FIG. 12. With the prior art stated above, it should be supposed that in a busy rate acquisition function 1208, the busy rate of a database is periodically acquired by utilizing a busy rate acquisition utility 1210, and the busy rate thus acquired is accumulated on a busy rate database 1211 in the busy rate acquisition function 1208.
In a backup execution conditions input function 1201, information including a threshold value to determine the executability of backup (backup executability reference value 1216) is input after comparing the respective busy rates of a date and time zone in which backup should be executed (backup candidate time zone 1214), time which is predicted to be necessary for backup (predicted backup time 1215), and a backup candidate time zone.
Then, in a busy rate extraction function 1212, under the assumption that work has periodicity and the busy rate of a database changes in a cycle, busy rates that have been accumulated in a busy rate database 1211 are extracted. In the above-stated prior art, a description is made by quoting an example wherein the cycle is presumed to be one year, and a busy rate 1217 during a backup candidate time zone on the same day, same week and same month of previous year is extracted.
Next, in a backup execution timing determining function 1204, a time zone where the busy rate is sufficiently small, namely, a time zone in which a busy rate is not exceeding the backup executability reference value 1216 is searched for among the busy rates that have already extracted, and an instruction is issued to a backup execution management function 1205 to execute backup in that time zone (in the above-stated prior art, such instruction information is called the backup execution plan). In the above-stated prior art, considering a case where a time zone in which a busy rate is not exceeding the backup executability reference value 1216 cannot be found, a method for increasing the value of the backup executability reference value 1216, and searching for a time zone in which a busy rate is not exceeding the backup executability reference value 1216 again. With the example shown in FIG. 12, since the value 20 of the busy rate during 1:00 to 2:00, among busy rates 1217 during backup candidate time zone on the same day, same week and same month of previous year, is smaller than 30 of the backup executability reference value 1216 which should be the backup conditions, a backup execution plan is prepared so that backup may be executed within the time zone, judging that the busy rate is sufficiently small.
The backup execution management function 1205 manages a backup execution plan created in a backup execution plan creating function 1202, and executes a backup execution utility 1206 when the time zone determined by above-stated backup execution time frame determining function 1204 is reached.
A method for determining a backup time frame according to the above-stated prior art will be described by referring to FIG. 13. With the example shown in FIG. 13, it shall be presumed that the busy rate changes at a one-year cycle as described in the above. In the graph shown in FIG. 13, the vertical axis indicates busy rate, while the horizontal axis indicates time. In the busy rate extraction function 1203 shown in FIG. 13, a busy rate 1301 on the same day, same week and same month of previous year (t1′ to t2′) is extracted, under the presumption that such busy rate has a one-year cycle, and then the busy rate is applied as an assessed value of the busy rate 1302 for the backup candidate time zone 1214 (t1 to t2). In the backup execution timing determining function 1204 shown in FIG. 12, an interval in which any busy rate among the busy rates in the backup candidate time zone (t1 to t2) 1214 extracted in the above, more specifically, an interval in which the busy rate is not exceeding the backup executability reference value 1216, is searched for, and the time zone is determined as a backup execution time zone 1303.
However, in recent years, the style of usage of the DBMS has been changing, and accordingly, such DBMS to be used by general people as those connected to the Internet have increased in number, in addition to such DBMS installed within an enterprise that is only used by limited persons. In addition, there is such DBMS that accepts accesses not only from domestic users, but also from overseas users, and with those cases, the amount of main processing will not always change periodically.
Under such a situation, the method for determining backup time frame on the assumption of periodical changes in the amount of main processing as is the case of above-stated prior art cannot be applied. Even if such method is applied, there is a possibility that the actual main processing amount of the DBMS can not be obtained at the presumed predetermined time, and therefore, backup may be carried out at a time when the amount of main processing is large. As a result, the frequency of the main processing may increase during the execution of an on-line backup, thus causing adverse affects in the main processing of the DBMS such as a delay.
Accordingly, to prevent adverse affects such as a delay during an on-line backup of the DBMS, it is necessary to acquire backup during a time zone in which the main processing of the DBMS is not affected.